#include<bits/stdc++.h>
using namespace std;
int T,n,m,L,V,a[1010],d[1000010],v[1010],p[100010];
int main()
{
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    cin>>T;
    for(int i=1;i<=T;i++)
    {
        cin>>n>>m>>L>>V;
        for(int i=1;i<=n;i++)
        {
            cin>>d[i]>>v[i]>>a[i];
        }
        for(int i=1;i<=m;i++)
        {
            cin>>p[i];
        }
    }
    cout<<"3"<<" "<<"3";
}
